peopel=int(input())
c=0
if peopel%2==0:
    for k in range(0,peopel+1,1):
        for m in range(0,peopel-k+1):
            w=peopel-k-m
            if k*0.5+m*3+w*2==peopel:
                c=c+1
else:
    for k in range(0,peopel,1):
        for m in range(0,peopel-k+1):
            w=peopel-k-m
            if k*0.5+m*3+w*2==peopel:
                c=c+1            
print(c)
